package com.tructc.vwad

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.transaction.annotation.Transactional;

@Transactional
class MeetingService implements ApplicationContextAware {

	ApplicationContext applicationContext;
	
	def addMeeting(meetingType, meetingLocation, meetingDescription)
	{
		Meeting m = new Meeting(typeOfMeeting: meetingType, location: meetingLocation, description: meetingDescription).save(failOnError : true);
		return m;
	}
	
	def listMeeting()
	{
		def meetings = Meeting.list();
		return meetings;
	}
   
}
